import request from '../../router/axios'

export const URI = {
  putFile: '/api/rapid-resource/oss/endpoint/put-file',
  putFileAttach: '/api/rapid-resource/oss/endpoint/put-file-attach',
  remove: '/api/rapid-resource/attach/remove'
}
export const putFileAttach = (file) => {
  const formData = new FormData()
  formData.append('file', file)
  return request.post(URI.putFileAttach, formData)
}
/**
 * 删除附件
 * @param ids
 * @returns {AxiosPromise<any>}
 */
export const remove = (ids) => request({
  url: URI.remove,
  method: 'post',
  params: {
    ids
  }
})
